<!DOCTYPE html>
<html>
  <head>
    <title><%= title %></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="stylesheets/bootstrap.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
		.ui-nav-container{margin-top: 20px;}
    </style>
  </head>
  <body>
  	<div class="container ui-nav-container">
	    <div class="navbar navbar-inverse">
	      <div class="navbar-inner">
	      	  <a class="brand" href="/">Microblog</a>
		      <ul class="nav">
		         <li class="active"><a href="/">首页</a></li>
              <% if(locals.user){ %>
                <li><a href="/logout">logout</a></li>
              <% } else { %>
               <li><a href="/login">登录</a></li>
               <li><a href="/reg">注册</a></li>
              <% } %>
		      </ul>
	      </div>
	    </div>
	</div>
    <div class="container">
      <% if(locals.success){ %>
        <div class="alert alert-success">
          <%= locals.success %>
        </div>
      <%  } %>
      <% if(locals.error){ %>
        <div class="alert alert-error">
          <%= locals.error %>
        </div>
      <% } %>
      <h1>test</h1>
      <footer>
        <p><a href="#" target="_blank">yuxiaolong</a> 2012</p>
      </footer>
    </div>
    <script src="https://code.jquery.com/jquery.js"></script>
    <script src="javascripts/bootstrap.min.js"></script>
  </body>
</html>